package com.lms.desiginmode.factory.model.color;

import com.lms.desiginmode.factory.model.AbstractFactory;
import com.lms.desiginmode.factory.model.shape.Shape;

/**
 * @Author: 李孟帅
 * @CreateTime: 2020-12-10 11:16
 * @Description:
 */
public class ColorFactory extends AbstractFactory {
    private static final String RED = "RED";
    private static final String YELLOW = "YELLOW";
    private static final String BLUE = "BLUE";

    @Override
    public  Color getColor(String type){
        if (RED.equals(type)){
            return new Red();
        }else if (YELLOW.equals(type)){
            return new Yellow();
        }else if(BLUE.equals(type)){
            return new Blue();
        }
        return null;
    }

    @Override
    public Shape getShape(String type) {
        return null;
    }
}
